package com.wangzhenyu.learn.common.view

import android.view.View
import android.widget.EditText
import android.widget.TextView
import com.wangzhenyu.learn.R

inline fun View.gone() {
    visibility = View.GONE
}

inline fun View.visiable() {
    visibility = View.VISIBLE
}

inline fun View.show(isShow: Boolean) {
    visibility = if (isShow) View.VISIBLE else View.GONE
}

inline fun View.invisiable() {
    visibility = View.INVISIBLE
}

inline fun TextView.getViewText(): String {
    return this.text.toString().trim()
}

inline fun EditText.getViewText(): String {
    return this.text.toString().trim()
}